package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.Member;
import com.itheima.pojo.Order;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public interface MemberDao {
    List<Member> findAll();

    Page<Member> selectByCondition(String queryString);

    void add(Member member);

    void deleteById(Integer id);

    Member findById(Integer id);

    Member findByTelephone(String telephone);

    void edit(Member member);

    Integer findMemberCountBeforeDate(String date);

    Integer findMemberCountByDate(String date);

    Integer findMemberCountAfterDate(String date);

    Integer findMemberTotalCount();

    int checkOrder(HashMap<String, Object> check);

    void editNameById(Order order);

    Member findMemberByTelephone(String phoneNumber);

    void updateById(Member member);

    String findPassword(String phoneNumber);

    void updatePassword(@Param("password") String newpassword, @Param("phoneNumber") String phoneNumber2);

    Integer findIdByTelephone(String telephone);

    void updatephoneNumber(@Param("id") Integer id, @Param("phoneNumber") String telephone);

    Integer findUserIfExist(@Param("telephone") String telephone, @Param("password") String password);

    Page<Member> queryPage(String queryString);

    Integer findRelevance(Integer id);

    List<String> findManagerByRoleId();

    List<Map<String, Object>> findNames(Integer id);

    List<Member> queryAll();
}
